<% extends "admin/layout.html" %>
<% block main%>
    <div id="graph_echarts" style="width:1800px; height:900px;"></div>
    <script type="text/javascript" src="https://assets.pyecharts.org/assets/echarts.min.js"></script>
<% endblock %>
<% block script %>
    $('#graph').addClass('layui-this');
     var chart = echarts.init(document.getElementById('graph_echarts'), 'white', {renderer: 'canvas'});
    var index=layer.load(2);
    $.ajax({
        type: "GET",
        url: "<< url_for('graph_data') >>",
        dataType: 'json',
        success: function (result) {
            layer.close(index);
            chart.setOption(result);
        }
    });
<% endblock %>